<?php
namespace App\Admin\Extensions\Form;

use Dcat\Admin\Form\Field\Select;
use Dcat\Admin\Support\Helper;

class Autocomplete extends Select
{
    protected $view = 'admin.autocomplete';

    public function render()
    {
        $this->defaultAttribute('type', 'text')
            ->defaultAttribute('name', $this->getElementName())
            ->defaultAttribute('value', $this->value())
            ->defaultAttribute('class', 'form-control '.$this->getElementClassString())
            ->defaultAttribute('placeholder', $this->placeholder());

        return parent::render();
    }
}
